<template>
  <div>
    <el-table :data="need">
      <el-table-column prop="code" label="编号"> </el-table-column>
      <el-table-column prop="title" label="标题"> </el-table-column>
      <el-table-column prop="described" label="描述"> </el-table-column>
      <el-table-column prop="money" label="金币"> </el-table-column>
      <el-table-column prop="userid" label="雇主"> </el-table-column>
      <el-table-column prop="jdid" label="接单人"> </el-table-column>
      <el-table-column
        prop="closeid"
        label="支付方式"
        :formatter="zhifu"
      ></el-table-column>
      <el-table-column prop="" label="操作">
        <template slot-scope="scope">
          <el-button type="text" size="small" @click="tj(scope.row.jdid,scope.row.money,scope.row.userid,scope.row.code)"
            >提交</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
    data(){
        return{
            userid:localStorage.getItem("userid"),
            need:""

        }
    },
    mounted(){
        this.funeed()

    },
    methods:{
        funeed(){
            this.axios.get("/funeed?userid="+this.userid).then(res =>{
                this.need = res.data.data
            })
        },
        tj(jdid,money,userid,code){
            this.axios.get("/zfneed?jdid="+jdid+"&userid="+userid+"&money="+money+"&code="+code).then(res =>{
                alert(res.data.msg)
            })
        }
    }

}
</script>

<style>

</style>